import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        //打印100-200的素数
        int i = 100;
        int j = 0;
        for(i = 100;i<=200;i++){
            for(j = 2;j<i;j++){
                if(i%j==0){
                    //System.out.println(i+"不是素数！");
                    break;
                }else{
                    System.out.println(i+"是素数！");
                    break;
                }
            }
        }
    }
    public static void main7(String[] args) {
        //输入一个数字，判断是否是素数
        Scanner scanner = new Scanner(System.in);
        int sc = scanner.nextInt();
        for(int i = 2;i<sc;i++){
            if(sc%i==0){
                System.out.println(sc+"不是素数！");
                break;
            }else{
                System.out.println(sc+"是素数！");
                break;
            }
        }
    }
    public static int fib2(int n){
        if(n ==1){
            return 0;
        }
        if(n==2){
            return 1;
        }
        int f1 = 0;
        int f2 = 1;
        int f3 = -1;
        for(int i = 3;i<=n;i++){
            f3 = f1+f2 ;
            f1 = f2;
            f2 = f3;
        }
        return f3;

    }
    public static void main6(String[] args) {
        //循环求斐波那契数列
        System.out.println(fib2(5));

    }
    public static int fib1(int n){
        if(n == 1){
            return 0;
        }
        if(n == 2){
            return 1;
        }
        return fib1(n-1) + fib1(n-2);
    }
    public static void main5(String[] args) {
        //递归求斐波那契数列
        System.out.println(fib1(1));
        System.out.println(fib1(2));
        System.out.println(fib1(3));
        System.out.println(fib1(4));
        System.out.println(fib1(5));
        System.out.println(fib1(6));
    }
    public static int sum2(int n){
        if(n<9){
            return n;
        }
            return sum2(n/10)+n%10;
    }
    public static void main4(String[] args) {
        System.out.println(sum2(1729));
    }
    public static void print(int n){
        if(n<9){
            System.out.println(n);
        }else {
            print(n / 10);
            System.out.println(n % 10);
        }
    }
    public static void main3(String[] args) {
        //使用递归输出123的每一位 1 2 3
        print(123);
    }
    public static void main2(String[] args) {
        //循环输出123的每一位3 2 1（迭代）
        int tmp = 123;
        while(tmp!=0){
            System.out.println(tmp%10);
            tmp /= 10;
        }
    }
    public static int fac(int n){
        if(n == 1){
            return 1;
        }
            int tmp = n*fac(n-1);
        return tmp;

    }
    public static void main1(String[] args) {
        System.out.println(fac(5));

    }
}
